<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[#assign path = var_contextpath + var_resrootpath + "/" + var_syscfg.sscTemplate/]
[#include "../inc/user/region.html"]
[#include "../inc/user/userAddrList.html"]

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta name="Generator" content="ECSHOP v2.7.2" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="Keywords" content="" />
	<meta name="Description" content="" />
	<title>用户中心-收货地址</title>
	<link rel="shortcut icon" href="favicon.ico" />
	<link rel="icon" href="animated_favicon.gif" type="image/gif" />
	<link rel="stylesheet" type="text/css" href="${path}/css/style.css" />
</head>
<body>
[#include "../inc/common/head.html"]
<div class="block box">
 <div id="ur_here">
  当前位置: <a href="${var_contextpath}/index.xhtml">首页</a> <code>&gt;</code> 用户中心 </div>
</div>
<div class="blank"></div>
<div class="block clearfix">
  [#include "../inc/common/leftMenu.html"]
  <div class="AreaR">
    <div class="box">
     <div class="box_1">
      <div class="userCenterBox boxCenterList clearfix" style="_height:1%;">
        <h5><span id="userAddrTitle">新增收货人信息</span></h5>
        <div class="blank"></div>
       	<form name="userAddrForm">
       		<table width="100%" cellpadding="5" cellspacing="1" bgcolor="#dddddd" border="0" >
       			<tr>
       				<td align="right" bgcolor="#ffffff">收货人姓名:</td>
       				<td bgcolor="#ffffff">
       					<input id="braConsignee" type="text" class="inputBg" value="" />
       					<input id="braId" type="hidden" class="inputBg" value="" />
       					<span style="color:#FF0000"> *</span>
					</td>
       			</tr>
       			<tr>
       				<td align="right" bgcolor="#ffffff">所在地区：</td>
       				<td bgcolor="#ffffff">
       					[#-- 读取区域列表自定义标签--]
						[@ecs_countrylist]
							[@ecs_ud_countryList par_bdrList_country = var_bdrList_country /]
							[@ecs_ud_provinceList /]
							[@ecs_ud_cityList /]
							[@ecs_ud_districtList /]
			          	[/@ecs_countrylist]
       					<span style="color:#FF0000;"> *</span>
					</td>
       			</tr>
       			<tr>
       				<td align="right" bgcolor="#ffffff">详细地址：</td>
       				<td bgcolor="#ffffff">
       					<textarea id="braDetail" class="inputBg" style="width: 280px; height:38px;font-size:13px;"></textarea>
       					<span style="color:#FF0000;"> *</span>
					</td>
       			</tr>
       			<tr>
       				<td align="right" bgcolor="#ffffff">邮政编码：</td>
       				<td bgcolor="#ffffff">
       					<input id="braZipcode" type="text" class="inputBg" value="" />
       					<span style="color:#FF0000;"></span>
					</td>
       			</tr>
       			<tr>
       				<td align="right" bgcolor="#ffffff">手机号码：</td>
       				<td bgcolor="#ffffff">
       					<input id="braMobile" type="text" class="inputBg" value="" />
       					<span style="color:#FF0000;"> *</span>
					</td>
       			</tr>
       			<tr>
       				<td align="right" bgcolor="#ffffff">固定电话：</td>
       				<td bgcolor="#ffffff">
       					<input id="braPhone" type="text" class="inputBg" value="" />
       					<span style="color:#FF0000;"></span>
					</td>
       			</tr>
       			<tr>
       				<td align="right" bgcolor="#ffffff">送货时间：</td>
       				<td bgcolor="#ffffff">
       					<input id="braTime" type="text" class="inputBg" value="" />
       					<span style="color:#FF0000;"></span>
					</td>
       			</tr>
       			<tr>
       				<td align="right" bgcolor="#ffffff">设为默认：</td>
       				<td bgcolor="#ffffff">
       					<input id="braIsdefault" type="checkbox" class="inputBg" value="1" />
       					<span style="color:#FF0000;"></span>
					</td>
       			</tr>
       			<tr>
       				<td bgcolor="#ffffff">&nbsp;</td>
       				<td bgcolor="#ffffff">
       					<input type="button" value="保存" class="bnt_blue_1" style="border:none;" 
	           				onclick="user_saveUserAddr();" id="saveUserAddrBtn"/>
					</td>
       			</tr>
       		</table>
       	</form>
       	<div class="blank"></div>
        <h5><span>已保存的有效地址</span></h5>
        <div class="blank"></div>
        <table id="userAddrTab" width="100%" cellpadding="5" cellspacing="1" bgcolor="#dddddd" border="0" >
        	<tr>
        		<td width="60px" align="center" bgcolor="#ffffff">收货人</td>
        		<td width="160px" align="center" bgcolor="#ffffff">所在地区</td>
        		<td align="center" bgcolor="#ffffff">详细地址</td>
        		<td width="70px" align="center" bgcolor="#ffffff">手机/座机</td>
        		<td width="55px" align="center" bgcolor="#ffffff">邮编</td>
        		<td width="55px" align="center" bgcolor="#ffffff">默认地址</td>
        		<td width="66px" align="center" bgcolor="#ffffff">操作</td>
        	</tr>
        	[#-- 读取会员地址列表自定义标签。参数说明：par_memberid（登录会员ID）--]
		    [@ecs_userAddrList par_memberid = var_member.bmbId ]
		    	[#-- 读取会员地址列表自定义宏。--]
		    	[#if var_userAddrList ??]
		    		[@ecs_ud_useraddrlist par_userAddrList = var_userAddrList /]
		    	[/#if]
		    [/@ecs_userAddrList]
   		</table>
   		<span>
	   		[#assign limitNum = ((var_userAddrLimitNum ? number)! 0)]
	   		[#assign currentNum = ((var_userAddrCurrentNum ? number)! 0)]
	   		
	   		[#if limitNum > 0]
	   			<div class="blank"></div>
	   			<span>最多保存${limitNum}个有效地址，已保存了${currentNum}个。</span>
	   		[/#if]
	   		
	   		<script type="text/javascript">
	   		<!--
	   			$(function() {
	   				if(${currentNum} >= ${limitNum}){
	   					$("#saveUserAddrBtn").attr('disabled',true);
	   				}
	   			});
	   		//-->
	   		</script>
   		</span>	
      </div>
     </div>
    </div>
  </div>
</div>
<div class="blank"></div>
[#include "../inc/common/bottomNav.html"]
[#include "../inc/common/footer.html"]</html>
